function getLocation() {
	//console.log("start::", new Date().getTime())
	return new Promise((resolve, reject)=> {
		//#ifdef MP-WEIXIN
		let _locationChangeFn = (res) => {
			//console.log('location change', res)
			res.errMsg = "getLocation:ok";
			resolve(res);
			//console.log("end::", new Date().getTime())
			wx.offLocationChange(_locationChangeFn);
		  }
		  wx.startLocationUpdate({
			success: (res) => {
			  //console.log(res, "startLocationUpdate");
			  wx.onLocationChange(_locationChangeFn)
			  //resolve()
			},
			fail: (err) => {
			  //console.log('获取当前位置失败', err)
			  //wx.hideLoading()
			  uni.showModal({
			  	title: "操作提示", content: "需要获取位置信息",
				success(modRes) {
					if(modRes.confirm) {
						uni.openSetting();
					}
				}
			  })
			  err.longitude = 0; err.latitude = 0;
			  resolve(err)
			}
		  })
		
		//#endif
		/* uni.getLocation({
			type: "gcj02",
			success(res) {
				resolve(res);
			},
			fail(res) {
				resolve(res);
			}
		}); */
	});
}
export default {
	getLocation: getLocation,
}